<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en" class="no-js">

    <head>

        <meta charset="utf-8">
        <title>Fullscreen Login</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- CSS -->
        <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
        <link rel="stylesheet" href="assets/css/reset.css">
        <link rel="stylesheet" href="assets/css/supersized.css">
        <link rel="stylesheet" href="assets/css/style.css">

		
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        
        <script type="text/javascript">
			function rsalogin(){
				var thisPwd = document.getElementById("login_password").value;
				//alert(thisPwd);
				bodyRSA();
				var result = encryptedString(key, encodeURIComponent(thisPwd));
				//alert(encodeURIComponent(thisPwd)+"\r\n"+result);
				$("#login_password").attr("value",result);
				document.getElementById("formid").submit();
			}
			var key ;
			function bodyRSA(){
				setMaxDigits(130);
			  	key = new RSAKeyPair("10001","","a1be9319d13fae8a0bb6ea5823df10ea3a2f2e085e8f904fa199aefecfaa61fac16ef7ebedb56943f7874b0ad2511d3ca22f6cec5bd827c11200c47c2a7323eb"); 
			}
			
			function hello(){
				
				document.getElementById("formid").submit();
			}
		</script>

    </head>

    <body>

        <div class="page-container">
            <h1>Login</h1>
            <form id="formid" action="${pageContext.request.contextPath}/users/hello" method="post">
                <input type="text" id="login_name" name="login_name" class="username" placeholder="账号">
                <input type="password" id="login_password" name="login_password" class="password" placeholder="密码">
                <button type="button" onclick="rsalogin()" >登录</button>
                <button type="button" onclick="hello()" >hello</button>
                <div class="error"><span>+</span></div>
            </form>
            <div class="connect">
                <p>使用其他登录方式</p>
                <p>
                    <a class="facebook" href=""></a>
                    <a class="twitter" href=""></a>
                </p>
            </div>
        </div>
       
        <!-- Javascript -->
        <script src="assets/js/jquery-1.8.2.min.js"></script>
        <script src="assets/js/supersized.3.2.7.min.js"></script>
        <script src="assets/js/supersized-init.js"></script>
        <script src="assets/js/scripts.js"></script>
		<script src="assets/js/RSA.js"></script>
		<script src="assets/js/BigInt.js"></script>
		<script src="assets/js/Barrett.js"></script>
    </body>

</html>

